<template>
  <el-container class="allbody" onscroll="false">

    <el-main style="height: 100%; z-index: 5">
      <el-row style="width: 100%; height: 10%">
        <el-form
          :inline="true"
          class="demo-form-inline"
          style="margin-top: 20px; margin-left: 10px"
        >
          <el-form-item>
            <el-input
              v-model="Equ"
              class="form-input"
              style="width: 300px"
              disabled
            ></el-input>
          </el-form-item>

          <el-form-item>
            <el-input
              v-model="Sydw"
              class="form-input"
              style="width: 500px"
              disabled
            ></el-input>
          </el-form-item>
          <el-select v-model="timeValue" @change="selectCheckDate">
            <el-option
              v-for="item in timeOption"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select>

          <!-- <el-form-item>
            <el-button style="color: #009bfe" @click="show">查询</el-button>
          </el-form-item> -->
          <el-form-item style="position: absolute; right: 20px">
            <i class="el-icon-back" style="color: black; font-size: 25px"></i>
            <el-button type="text" style="color: black; font-size: 22px"
            @click="switchList"
              >返回上一级</el-button
            >
          </el-form-item>
        </el-form>
      </el-row>
      <el-row style="height: 100%; width: 100%">
        <el-container style="height: 4%; width: 100%">
          <el-aside style="height: 100%; width: 20%; border: 1px solid #000000">
            <div
              style="
                color: black;
                font-size: 22px;
                margin-top: 2px;
                text-align: center;
              "
            >
              使用单位名称
            </div>
          </el-aside>
          <el-aside style="height: 100%; width: 80%; border: 1px solid #000000">
            <div
              style="
                color: black;
                font-size: 22px;
                margin-top: 2px;
                text-align: center;
              "
            >
              {{checkData.c001}}
            </div>
          </el-aside>
        </el-container>

        <el-container style="height: 4%; width: 100%">
          <el-aside style="height: 100%; width: 20%; border: 1px solid #000000">
            <div
              style="
                color: black;
                font-size: 22px;
                margin-top: 2px;
                text-align: center;
              "
            >
              使用单位地址
            </div>
          </el-aside>
          <el-aside style="height: 100%; width: 80%; border: 1px solid #000000">
            <div
              style="
                color: black;
                font-size: 22px;
                margin-top: 2px;
                text-align: center;
              "
            >
               {{checkData.c002}}
            </div>
          </el-aside>
        </el-container>

        <el-container style="height: 4%; width: 100%">
          <el-aside style="height: 100%; width: 20%; border: 1px solid #000000">
            <div
              style="
                color: black;
                font-size: 22px;
                margin-top: 2px;
                text-align: center;
              "
            >
              使用地点
            </div>
          </el-aside>
          <el-aside style="height: 100%; width: 80%; border: 1px solid #000000">
            <div
              style="
                color: black;
                font-size: 22px;
                margin-top: 2px;
                text-align: center;
              "
            >
               {{checkData.c003}}
            </div>
          </el-aside>
        </el-container>

        <el-container style="height: 10%; width: 100%">
          <el-aside style="height: 100%; width: 20%; border: 1px solid #000000">
            <div
              style="
                color: black;
                font-size: 22px;
                margin-top: 30px;
                text-align: center;
              "
            >
              使用单位统一社会信用代码
            </div>
          </el-aside>
          <el-aside style="height: 100%; width: 20%; border: 1px solid #000000">
            <div
              style="
                color: black;
                font-size: 22px;
                margin-top: 30px;
                text-align: center;
              "
            >
               {{checkData.c004}}
            </div>
          </el-aside>
          <el-aside style="height: 100%; width: 30%; border: 1px solid #000000">
            <div
              style="
                color: black;
                font-size: 22px;
                margin-top: 30px;
                text-align: center;
              "
            >
              使用单位安全管理人员
            </div>
          </el-aside>
          <el-aside style="height: 100%; width: 30%; border: 1px solid #000000">
            <div
              style="
                color: black;
                font-size: 22px;
                margin-top: 30px;
                text-align: center;
              "
            >
               {{checkData.c005}}
            </div>
          </el-aside>
        </el-container>

        <el-container style="height: 4%; width: 100%">
          <el-aside style="height: 100%; width: 20%; border: 1px solid #000000">
            <div
              style="
                color: black;
                font-size: 22px;
                margin-top: 2px;
                text-align: center;
              "
            >
              使用单位联系电话
            </div>
          </el-aside>
          <el-aside style="height: 100%; width: 20%; border: 1px solid #000000">
            <div
              style="
                color: black;
                font-size: 22px;
                margin-top: 2px;
                text-align: center;
              "
            >
               {{checkData.c006}}
            </div>
          </el-aside>
          <el-aside style="height: 100%; width: 30%; border: 1px solid #000000">
            <div
              style="
                color: black;
                font-size: 22px;
                margin-top: 2px;
                text-align: center;
              "
            >
              使用单位邮政编码
            </div>
          </el-aside>
          <el-aside style="height: 100%; width: 30%; border: 1px solid #000000">
            <div
              style="
                color: black;
                font-size: 22px;
                margin-top: 2px;
                text-align: center;
              "
            >
               {{checkData.c007}}
            </div>
          </el-aside>
        </el-container>

        <el-container style="height: 4%; width: 100%">
          <el-aside style="height: 100%; width: 20%; border: 1px solid #000000">
            <div
              style="
                color: black;
                font-size: 22px;
                margin-top: 2px;
                text-align: center;
              "
            >
              制造单位名称
            </div>
          </el-aside>
          <el-aside style="height: 100%; width: 80%; border: 1px solid #000000">
            <div
              style="
                color: black;
                font-size: 22px;
                margin-top: 2px;
                text-align: center;
              "
            >
               {{checkData.c008}}
            </div>
          </el-aside>
        </el-container>

        <el-container style="height: 4%; width: 100%">
          <el-aside style="height: 100%; width: 20%; border: 1px solid #000000">
            <div
              style="
                color: black;
                font-size: 22px;
                margin-top: 2px;
                text-align: center;
              "
            >
              改造（重大修理）单位名称
            </div>
          </el-aside>
          <el-aside style="height: 100%; width: 80%; border: 1px solid #000000">
            <div
              style="
                color: black;
                font-size: 22px;
                margin-top: 2px;
                text-align: center;
              "
            > {{checkData.c009}}</div>
          </el-aside>
        </el-container>

        <el-container style="height: 4%; width: 100%">
          <el-aside style="height: 100%; width: 20%; border: 1px solid #000000">
            <div
              style="
                color: black;
                font-size: 22px;
                margin-top: 2px;
                text-align: center;
              "
            >
              设备类别
            </div>
          </el-aside>
          <el-aside style="height: 100%; width: 20%; border: 1px solid #000000">
            <div
              style="
                color: black;
                font-size: 22px;
                margin-top: 2px;
                text-align: center;
              "
            >
               {{checkData.c010}}
            </div>
          </el-aside>
          <el-aside style="height: 100%; width: 30%; border: 1px solid #000000">
            <div
              style="
                color: black;
                font-size: 22px;
                margin-top: 2px;
                text-align: center;
              "
            >
              设备品种
            </div>
          </el-aside>
          <el-aside style="height: 100%; width: 30%; border: 1px solid #000000">
            <div
              style="
                color: black;
                font-size: 22px;
                margin-top: 2px;
                text-align: center;
              "
            >
               {{checkData.c011}}
            </div>
          </el-aside>
        </el-container>

        <el-container style="height: 4%; width: 100%">
          <el-aside style="height: 100%; width: 20%; border: 1px solid #000000">
            <div
              style="
                color: black;
                font-size: 22px;
                margin-top: 2px;
                text-align: center;
              "
            >
              型号规格
            </div>
          </el-aside>
          <el-aside style="height: 100%; width: 20%; border: 1px solid #000000">
            <div
              style="
                color: black;
                font-size: 22px;
                margin-top: 2px;
                text-align: center;
              "
            >
               {{checkData.c012}}
            </div>
          </el-aside>
          <el-aside style="height: 100%; width: 30%; border: 1px solid #000000">
            <div
              style="
                color: black;
                font-size: 22px;
                margin-top: 2px;
                text-align: center;
              "
            >
              设备代码
            </div>
          </el-aside>
          <el-aside style="height: 100%; width: 30%; border: 1px solid #000000">
            <div
              style="
                color: black;
                font-size: 22px;
                margin-top: 2px;
                text-align: center;
              "
            >
               {{checkData.c013}}
            </div>
          </el-aside>
        </el-container>

        <el-container style="height: 4%; width: 100%">
          <el-aside style="height: 100%; width: 20%; border: 1px solid #000000">
            <div
              style="
                color: black;
                font-size: 22px;
                margin-top: 2px;
                text-align: center;
              "
            >
              产品编号
            </div>
          </el-aside>
          <el-aside style="height: 100%; width: 20%; border: 1px solid #000000">
            <div
              style="
                color: black;
                font-size: 22px;
                margin-top: 2px;
                text-align: center;
              "
            >
               {{checkData.c014}}
            </div>
          </el-aside>
          <el-aside style="height: 100%; width: 30%; border: 1px solid #000000">
            <div
              style="
                color: black;
                font-size: 22px;
                margin-top: 2px;
                text-align: center;
              "
            >
              单位内编号
            </div>
          </el-aside>
          <el-aside style="height: 100%; width: 30%; border: 1px solid #000000">
            <div
              style="
                color: black;
                font-size: 22px;
                margin-top: 2px;
                text-align: center;
              "
            >
               {{checkData.c015}}
            </div>
          </el-aside>
        </el-container>

        <el-container style="height: 4%; width: 100%">
          <el-aside style="height: 100%; width: 20%; border: 1px solid #000000">
            <div
              style="
                color: black;
                font-size: 22px;
                margin-top: 2px;
                text-align: center;
              "
            >
              投入使用日期
            </div>
          </el-aside>
          <el-aside style="height: 100%; width: 20%; border: 1px solid #000000">
            <div
              style="
                color: black;
                font-size: 22px;
                margin-top: 2px;
                text-align: center;
              "
            >
                {{checkData.c016!=null?new Date(checkData.c016).toLocaleDateString():''}}
            </div>
          </el-aside>
          <el-aside style="height: 100%; width: 30%; border: 1px solid #000000">
            <div
              style="
                color: black;
                font-size: 22px;
                margin-top: 2px;
                text-align: center;
              "
            >
              设计使用年限
            </div>
          </el-aside>
          <el-aside style="height: 100%; width: 30%; border: 1px solid #000000">
            <div
              style="
                color: black;
                font-size: 22px;
                margin-top: 2px;
                text-align: center;
              "
            >
               {{checkData.c0017}}
            </div>
          </el-aside>
        </el-container>

        <el-container style="height: 25%; width: 100%">
          <el-aside style="height: 100%; width: 20%; border: 1px solid #000000">
            <div
              style="
                color: black;
                font-size: 22px;
                margin-top: 100px;
                text-align: center;
              "
            >
              性能参数
            </div>
          </el-aside>

          <el-aside style="height: 100%; width: 80%">
            <el-container style="height: 20%; width: 100%">
              <el-aside
                style="height: 100%; width: 20%; border: 1px solid #000000"
              >
                <div
                  style="
                    color: black;
                    font-size: 22px;
                    margin-top: 6px;
                    text-align: center;
                  "
                >
                  跨度
                </div>
              </el-aside>
              <el-aside
                style="height: 100%; width: 20%; border: 1px solid #000000"
              >
                <div
                  style="
                    color: black;
                    font-size: 22px;
                    margin-top: 6px;
                    text-align: center;
                  "
                >
                   {{(checkData.c018!=null?checkData.c018:'')+' m'}}
                </div> 
              </el-aside>
              <el-aside
                style="height: 100%; width: 30%; border: 1px solid #000000"
              >
                <div
                  style="
                    color: black;
                    font-size: 22px;
                    margin-top: 6px;
                    text-align: center;
                  "
                >
                  额定起重量
                </div>
              </el-aside>
              <el-aside
                style="height: 100%; width: 30%; border: 1px solid #000000"
              >
                <div
                  style="
                    color: black;
                    font-size: 22px;
                    margin-top: 6px;
                    text-align: center;
                  "
                >
                   {{(checkData.c019!=null?checkData.c019:'')+' t'}}
                </div>
              </el-aside>
            </el-container>
            <el-container style="height: 20%; width: 100%">
              <el-aside
                style="height: 100%; width: 20%; border: 1px solid #000000"
              >
                <div
                  style="
                    color: black;
                    font-size: 22px;
                    margin-top: 6px;
                    text-align: center;
                  "
                >
                  工作级别
                </div>
              </el-aside>
              <el-aside
                style="height: 100%; width: 20%; border: 1px solid #000000"
              >
                <div
                  style="
                    color: black;
                    font-size: 22px;
                    margin-top: 6px;
                    text-align: center;
                  "
                >
                   {{checkData.c020}}
                </div>
              </el-aside>
              <el-aside
                style="height: 100%; width: 30%; border: 1px solid #000000"
              >
                <div
                  style="
                    color: black;
                    font-size: 22px;
                    margin-top: 6px;
                    text-align: center;
                  "
                >
                  起升速度
                </div>
              </el-aside>
              <el-aside
                style="height: 100%; width: 30%; border: 1px solid #000000"
              >
                <div
                  style="
                    color: black;
                    font-size: 22px;
                    margin-top: 6px;
                    text-align: center;
                  "
                >
                   {{(checkData.c021!=null?checkData.c021:'')+' m/min'}}
                </div>
              </el-aside>
            </el-container>
            <el-container style="height: 20%; width: 100%">
              <el-aside
                style="height: 100%; width: 20%; border: 1px solid #000000"
              >
                <div
                  style="
                    color: black;
                    font-size: 22px;
                    margin-top: 6px;
                    text-align: center;
                  "
                >
                  小车（纵移）运行速度
                </div>
              </el-aside>
              <el-aside
                style="height: 100%; width: 20%; border: 1px solid #000000"
              >
                <div
                  style="
                    color: black;
                    font-size: 22px;
                    margin-top: 6px;
                    text-align: center;
                  "
                >
                   <!-- {{checkData.c022 +' m/min'}} -->
                   {{(checkData.c022!=null?checkData.c022:'')+' m/min'}}              
                </div>
              </el-aside>
              <el-aside
                style="height: 100%; width: 30%; border: 1px solid #000000"
              >
                <div
                  style="
                    color: black;
                    font-size: 22px;
                    margin-top: 6px;
                    text-align: center;
                  "
                >
                  大车（横移）运行速度
                </div>
              </el-aside>
              <el-aside
                style="height: 100%; width: 30%; border: 1px solid #000000"
              >
                <div
                  style="
                    color: black;
                    font-size: 22px;
                    margin-top: 6px;
                    text-align: center;
                  "
                >
                 <!-- {{checkData.c023 +' m/min'}} -->
                   {{(checkData.c023!=null?checkData.c023:'')+' m/min'}}

                </div>
              </el-aside>
            </el-container>
            <el-container style="height: 20%; width: 100%">
              <el-aside
                style="height: 100%; width: 20%; border: 1px solid #000000"
              >
                <div
                  style="
                    color: black;
                    font-size: 22px;
                    margin-top: 6px;
                    text-align: center;
                  "
                >
                  起升高度
                </div>
              </el-aside>
              <el-aside
                style="height: 100%; width: 20%; border: 1px solid #000000"
              >
                <div
                  style="
                    color: black;
                    font-size: 22px;
                    margin-top: 6px;
                    text-align: center;
                  "
                >
                  <!-- {{checkData.c024 +' m/min'}} -->
                   {{(checkData.c024!=null?checkData.c024:'')+' m/min'}}

                </div>
              </el-aside>
              <el-aside
                style="height: 100%; width: 30%; border: 1px solid #000000"
              >
                <div
                  style="
                    color: black;
                    font-size: 22px;
                    margin-top: 6px;
                    text-align: center;
                  "
                >
                  小车运行速度
                </div>
              </el-aside>
              <el-aside
                style="height: 100%; width: 30%; border: 1px solid #000000"
              >
                <div
                  style="
                    color: black;
                    font-size: 22px;
                    margin-top: 6px;
                    text-align: center;
                  "
                >
                  <!-- {{checkData.c025 +' m/min'}} -->
                   {{(checkData.c025!=null?checkData.c025:'')+' m/min'}}

                </div>
              </el-aside>
            </el-container>
            <el-container style="height: 20%; width: 100%">
              <el-aside
                style="height: 100%; width: 20%; border: 1px solid #000000"
              >
                <div
                  style="
                    color: black;
                    font-size: 22px;
                    margin-top: 6px;
                    text-align: center;
                  "
                >
                  其他主要参数
                </div>
              </el-aside>
              <el-aside
                style="height: 100%; width: 80%; border: 1px solid #000000"
              >
                <div
                  style="
                    color: black;
                    font-size: 22px;
                    margin-top: 6px;
                    text-align: center;
                  "
                >
                  {{checkData.c026}}
                </div>
              </el-aside>
            </el-container>
          </el-aside>
        </el-container>

        <el-container style="height: 4%; width: 100%">
          <el-aside style="height: 100%; width: 20%; border: 1px solid #000000">
            <div
              style="
                color: black;
                font-size: 22px;
                margin-top: 2px;
                text-align: center;
              "
            >
              检验依据
            </div>
          </el-aside>
          <el-aside style="height: 100%; width: 80%; border: 1px solid #000000">
            <div
              style="
                color: black;
                font-size: 22px;
                margin-top: 2px;
                text-align: center;
              "
            >
              {{checkData.c027}}
            </div>
          </el-aside>
        </el-container>

        <!-- <el-container style="height: 10%; width: 100%">
          <el-aside style="height: 100%; width: 20%; border: 1px solid #000000">
            <div
              style="
                color: black;
                font-size: 22px;
                margin-top: 30px;
                text-align: center;
              "
            >
              检验结论
            </div>
          </el-aside>

          <el-aside style="height: 100%; width: 80%">
            <el-container style="height: 50%; width: 100%">
              <el-aside
                style="height: 100%; width: 100%; border: 1px solid #000000"
              >
                <div
                  style="
                    color: black;
                    font-size: 22px;
                    margin-top: 6px;
                    text-align: center;
                  "
                >
                  {{checkData.c028}}
                </div>
              </el-aside>
            </el-container>
            <el-container style="height: 50%; width: 100%">
              <el-aside
                style="height: 100%; width: 100%; border: 1px solid #000000"
              >
                <div
                  style="
                    color: black;
                    font-size: 22px;
                    margin-top: 6px;
                    text-align: center;
                  "
                >
                  {{new Date(checkData.c029).toLocaleDateString()}}
                </div>
              </el-aside>
            </el-container>
          </el-aside>
        </el-container> -->
        <el-container style="height: 4%; width: 100%">
          <el-aside style="height: 100%; width: 20%; border: 1px solid #000000">
            <div
              style="
                color: black;
                font-size: 22px;
                margin-top: 2px;
                text-align: center;
              "
            >
              检验结论
            </div>
          </el-aside>
          <el-aside style="height: 100%; width: 80%; border: 1px solid #000000">
            <div
              style="
                color: black;
                font-size: 22px;
                margin-top: 2px;
                text-align: center;
              "
            >
                {{checkData.c028}}
            </div>
          </el-aside>
        </el-container>
        <el-container style="height: 4%; width: 100%">
          <el-aside style="height: 100%; width: 20%; border: 1px solid #000000">
            <div
              style="
                color: black;
                font-size: 22px;
                margin-top: 2px;
                text-align: center;
              "
            >
              下次检验日期
            </div>
          </el-aside>
          <el-aside style="height: 100%; width: 80%; border: 1px solid #000000">
            <div
              style="
                color: black;
                font-size: 22px;
                margin-top: 2px;
                text-align: center;
              "
            >
            <!-- {{new Date(checkData.c029).toLocaleDateString()}} -->
              {{(checkData.c029!=null)&&(checkData.c029!='')?new Date(checkData.c029).toLocaleDateString():''}}

            </div>
          </el-aside>
        </el-container>
        <el-container style="height: 4%; width: 100%">
          <el-aside style="height: 100%; width: 20%; border: 1px solid #000000">
            <div
              style="
                color: black;
                font-size: 22px;
                margin-top: 2px;
                text-align: center;
              "
            >
              备注
            </div>
          </el-aside>
          <el-aside style="height: 100%; width: 80%; border: 1px solid #000000">
            <div
              style="
                color: black;
                font-size: 22px;
                margin-top: 2px;
                text-align: center;
              "
            >
              {{checkData.c030}}
            </div>
          </el-aside>
        </el-container>

        <el-container style="height: 15%; width: 100%">
          <el-aside style="height: 100%; width: 60%">
            <el-container style="height: 33.3%; width: 100%">
              <el-aside
                style="height: 100%; width: 100%; border: 1px solid #000000"
              >
                <div
                  style="
                    color: black;
                    font-size: 22px;
                    margin-top: 6px;
                    text-align: center;
                  "
                >
                   检验： 日期： 
                   <!-- {{new Date(checkData.c031).toLocaleDateString()}} -->
                <!-- {{checkData.c031!=null?new Date(checkData.c031).toLocaleDateString():''}} -->
                  {{(checkData.c031!=null)&&(checkData.c031!='')?new Date(checkData.c031).toLocaleDateString():''}}


                </div>
              </el-aside>
            </el-container>
            <el-container style="height: 33.3%; width: 100%">
              <el-aside
                style="height: 100%; width: 100%; border: 1px solid #000000"
              >
                <div
                  style="
                    color: black;
                    font-size: 22px;
                    margin-top: 6px;
                    text-align: center;
                  "
                >
                  审核： 日期： 
                  <!-- {{new Date(checkData.c032).toLocaleDateString()}} -->
                  {{(checkData.c032!=null)&&(checkData.c032!='')?new Date(checkData.c032).toLocaleDateString():''}}

                </div>
              </el-aside>
            </el-container>
            <el-container style="height: 33.3%; width: 100%">
              <el-aside
                style="height: 100%; width: 100%; border: 1px solid #000000"
              >
                <div
                  style="
                    color: black;
                    font-size: 22px;
                    margin-top: 6px;
                    text-align: center;
                  "
                >
                  批准： 日期： 
                  <!-- {{new Date(checkData.c033).toLocaleDateString()}} -->
                    {{(checkData.c033!=null)&&(checkData.c033!='')?new Date(checkData.c033).toLocaleDateString():''}}

                </div>
              </el-aside>
            </el-container>
          </el-aside>
          <el-aside style="height: 100%; width: 40%; border: 1px solid #000000">
            <div
              style="
                color: black;
                font-size: 22px;
                margin-top: 0px;
                text-align: left;
              "
            >
              检验机构核准证号：{{checkData.c034}}
            </div>
            <div
              style="
                color: black;
                font-size: 22px;
                margin-top: 10%;
                text-align: right;
              "
            >
              （检验机构检验专用章或者公章)
            </div>
          </el-aside>
        </el-container>
      </el-row>
    </el-main>
  </el-container>
</template>

<script>
import ElContainer from "element-ui/packages/container/src/main";
import ElAside from "element-ui/packages/aside/src/main";
import ElHeader from "element-ui/packages/header/src/main";
import ElMain from "element-ui/packages/main/src/main";

import { get, get as userType, del, dels } from "@/api/sys/connSysAuthApi";
import { parseTime } from "@/utils";
import { req } from "@/api/base/BaseApi";

import Calendar from "vue-calendar-component";

export default {
  name: "detail",
  components: { Calendar },
  comments: {
    ElMain,
    ElHeader,
    ElAside,
    ElContainer,
  },
  props:{
    detailList:Array,
  },
  methods: {
    dateFormat(time) {
      var date = new Date(time);
      var year = date.getFullYear();
      /* 在日期格式中，月份是从0开始的，因此要加0
       * 使用三元表达式在小于10的前面加0，以达到格式统一  如 09:11:05
       * */
      var month =
        date.getMonth() + 1 < 10
          ? "0" + (date.getMonth() + 1)
          : date.getMonth() + 1;
      var day = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();
      var hours =
        date.getHours() < 10 ? "0" + date.getHours() : date.getHours();
      var minutes =
        date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
      var seconds =
        date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds();
      // 拼接
      return (
        year +
        "-" +
        month +
        "-" +
        day +
        " " +
        hours +
        ":" +
        minutes +
        ":" +
        seconds
      );
    },
    tableRowStyle({ row, rowIndex }) {
      return "background-color: #02152f;color: #fff";
    },
    tableHeaderColor({ row, column, rowIndex, columnIndex }) {
      if (rowIndex === 0) {
        return "background-color: #2ec7c9;color: #fff;font-weight: 500;";
      }
    },
    handleSetLineChartData(type) {
      this.lineChartData = lineChartData[type];
    },
    getRowClass({ row, column, rowIndex, columnIndex }) {
      return "background:#06134A;color:#72C22D;";
    },
    getTableDataFormSon(data) {
      const tableDataTemp = data;
      this.tableData = [];
      for (let j = 9; j >= 0; j--) {
        const tableDataI = {};
        for (let i = 0; i < this.measurePoints.length; i++) {
          const point = this.measurePoints[i];
          const values = tableDataTemp.get(point);
          const date = new Date(values[j].name);
          if (i <= 0) {
            tableDataI["time"] =
              date.getFullYear() +
              "/" +
              (date.getMonth() + 1) +
              "/" +
              date.getDate() +
              " " +
              date.getHours() +
              ":" +
              date.getMinutes() +
              ":" +
              date.getSeconds();
          }
          tableDataI[point + "value"] = values[j].value;
        }
        this.tableData.push(tableDataI);
      }
      this.currTableData = [];
      for (let i = 0; i < this.measurePoints.length; i++) {
        const point = this.measurePoints[i];
        const values = tableDataTemp.get(point);
        const date = new Date(values[values.length - 1].name);
        this.currTableData.push({
          point: point,
          data: values[values.length - 1].value,
          time:
            date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds(),
        });
      }
    },
    selectCheckDate(value){ // 根据选中的日期切换报告
    console.log('选中的值是:',value);
    this.checkData=this.checkDataList[+value]
    },
    show() {
      //显示所有工艺流程信息

      this.mydate = this.year + "-" + this.month + "-" + this.day;
      console.log(this.mydate);
      req("/api/sys/auth/MG/pointList/" + this.mydate, "GET", "")
        .then((response) => {
          var i = 0;
          var str = "";
          for (i; i < 56; i++) {
            if (i < 7) {
              str = "f00";
            } else {
              str = "f0";
            }
            str += i + 3;
            this.tableData[i].workTemperature = response.data[0][str];
            //console.log(this.tableData[i].workTemperature)
          }
        })
        .catch(() => console.log("page request error"));
    },
    switchList(){
      this.$emit('switchList')
    },
    yearChange(id, type) {
      this.year = id;
    },
    monthChange(id, type) {
      this.month = id;
    },
    dayChange(id, type) {
      this.day = id;
    },
  },
  created() {
    // req("/api/sys/auth/MG/pointIndexList", "POST", "")
    //   .then((response) => {
    //     var i = 0;
    //     for (i; i < 56; i++) {
    //       this.tableData[i].one = response.data[i].id;
    //       this.tableData[i].two = response.data[i].part;
    //       this.tableData[i].three = response.data[i].partcontent;
    //     }
    //   })
    //   .catch(() => console.log("page request error"));

    // 根据传入的定检数据列表，选中第一个用于显示
    console.log('传入的list是：',this.detailList)
    this.checkDataList=this.detailList;
    if(this.checkDataList.length>0){
      this.checkData=this.checkDataList[0];
      // 设置页头企业编号，使用单位，时间
      this.EquValue=this.checkData.Equ;
      this.SydwValue=this.checkData.Sydw;
      this.timeValue=new Date(this.checkData.c031+'').toLocaleDateString();
      // 生成日期选项
      for(const index in this.checkDataList){
        this.timeOption.push({
          value:+index,
          label:new Date(this.checkDataList[index].c031+'').toLocaleDateString()
        })
      }
    }

    
  },
  computed: {
    Equ() {
      return "设备编号：" + this.EquValue;
    },
    Sydw() {
      return "使用单位：" + this.SydwValue;
    },
  },
  data() {
    return {
      EquValue: "", // 当前设备的（内部）编号
      SydwValue: "", // 当前设备的的使用单位
      timeOption: [
        // 定检报告的时间，几份报告就有几个时间，按时间确定一份定检报告
      ],
      timeValue: "", // 当前选中的定检报告的时间
      checkData: {}, // 当前选中的定检报告
      checkDataList: [], // 当前设备的定检报告列表
      

      //--------------------------------------------------------
      date: new Date(),
      year: "",
      month: "",
      day: "",
      mydate: "",

      location: "",

      city: "",

      calendar: {},
      tableData: [
        {
          one: "1",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "2",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "3",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
        {
          one: "56",
          two: "KQ13063",
          three: "桥式",
          workTemperature: "",
        },
      ],
    };
  },
  filters: {
    userTypeFilter(type) {
      let typeText = type;
      userTypes.forEach((val) => {
        if (type === val.value) {
          typeText = val.name;
        }
      });
      return typeText;
    },
    menuFilter(ids) {
      let length = 0;
      if (ids) {
        length = ids.length;
      }
      return length;
    },
    dateTimeFilter(time) {
      return parseTime(time);
    },
  },
  mounted() {
    let _this = this; //声明一个变量指向vue实例this,保证作用域一致
    (this.timer = setInterval(function () {
      _this.date = new Date(); //修改数据date
    }, 1000)),
      console.log(this.$route.path); // 输出当前页面的路由，如：/home
  },
};
</script>

<style lang="less" scoped>
.headerbackgroud {
}
.allbody {
  width: 100%;
  height: 1050px;
}
.rowclass {
  width: 100%;
  height: 50%;
}

#text {
  -webkit-text-fill-color: white;
}
.select {
  color: white;
}
.hello {
  // 未选中任何选项的时候 placeholder的样式 需要先选中父元素 增加权重
  /deep/ input::-webkit-input-placeholder {
    color: #fff;
  }
  /deep/ input::-moz-input-placeholder {
    color: #fff;
  }
  /deep/ input::-ms-input-placeholder {
    color: #fff;
  }

  //修改的是el-input的样式
  //一种方法是设置最里层el-input__inner的背景色 外层的两级父元素设置为透明色
  //另一种方法是从el-select到el-input__inenr的背景色都设置为需要的颜色
  /deep/ .el-select,
  /deep/ .el-input,
  /deep/ .el-input__inner {
    background-color: #08164d;
    color: #fff;
    border: 0px;
    border-radius: 0px;
    text-align: center;
  }
}
.form-input /deep/ .el-input__inner {
  color: rgb(0, 0, 0) !important;
}
.map1,
.map2,
.map3 {
  position: absolute;
  opacity: 0.5;
}
.map1 {
  margin-left: 580px;
  margin-top: 230px;
  z-index: 2;
  animation: myfirst2 15s infinite linear;
}
.map2 {
  margin-left: 625px;
  margin-top: 275px;
  z-index: 3;
  opacity: 0.2;
  animation: myfirst 10s infinite linear;
}
.map3 {
  margin-left: 650px;
  margin-top: 300px;
  z-index: 1;
}
@keyframes myfirst2 {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(359deg);
  }
}

@keyframes myfirst {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(-359deg);
  }
}
</style>
